package kr.pe.johnkim.chattingday.mobile.rest.service;

import kr.pe.johnkim.chattingday.mobile.domain.ChattingDayMember;
import kr.pe.johnkim.chattingday.mobile.domain.ChattingDayMemberBlocked;
import kr.pe.johnkim.chattingday.mobile.rest.dao.ChattingDayMemberBlockedDao;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;

import java.util.List;

/**
 * @author : johnkim <cale9797@gmail.com / Bettersoft Inc,.>
 * @Date : 12. 6. 13
 */
public class ChattingDayMemberBlockedServiceImpl implements ChattingDayMemberBlockedService {

    // SLF4J Logging
	private Logger logger = LoggerFactory.getLogger(ChattingDayMemberBlockedServiceImpl.class);

    @Autowired
    private ChattingDayMemberBlockedDao chattingDayMemberBlockedDao = null;

    /**
     * 차단 사용자를 등록 한다.
     *
     * @param chattingDayMemberBlocked
     * @return
     */
    @Override
    public boolean registerMemberBlocked(ChattingDayMemberBlocked chattingDayMemberBlocked) {
        logger.info("registerMemberBlocked");

        return chattingDayMemberBlockedDao.registerMemberBlocked(chattingDayMemberBlocked);
    }

    /**
     * 차단 사용자를 비활성화 한다.
     *
     * @param chattingDayMemberBlocked
     * @return
     */
    @Override
    public boolean updateDeactivateMemberBlocked(ChattingDayMemberBlocked chattingDayMemberBlocked) {
        logger.info("updateDeactivateMemberBlocked");

        return chattingDayMemberBlockedDao.updateDeactivateMemberBlocked(chattingDayMemberBlocked);
    }

    /**
     * 차단 사용자 목록을 가져 온다.
     *
     * @param chattingDayMemberBlocked
     * @return
     */
    @Override
    public List<ChattingDayMemberBlocked> selectMemberBlockedList(ChattingDayMemberBlocked chattingDayMemberBlocked) {
        logger.info("selectMemberBlockedList");

        return chattingDayMemberBlockedDao.selectMemberBlockedList(chattingDayMemberBlocked);
    }

    /**
     * 차단 사용자 정보를 가져 온다.
     *
     * @param chattingDayMemberBlocked
     * @return
     */
    @Override
    public ChattingDayMember selectMemberBlockedInformation(ChattingDayMemberBlocked chattingDayMemberBlocked) {
        logger.info("selectMemberBlockedInformation");

        return chattingDayMemberBlockedDao.selectMemberBlockedInformation(chattingDayMemberBlocked);
    }

    /**
     * 차단 사용자 총 명수를 가져 온다.
     *
     * @param chattingDayMemberBlocked
     * @return
     */
    @Override
    public ChattingDayMemberBlocked selectMemberBlockedCount(ChattingDayMemberBlocked chattingDayMemberBlocked) {
        logger.info("selectMemberBlockedCount");

        return chattingDayMemberBlockedDao.selectMemberBlockedCount(chattingDayMemberBlocked);
    }
}
